﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace XEvents.Library
{
    internal struct dm_xe_session_event
    {
        internal string event_session_address;
        internal string event_name;
        internal Guid event_package_guid;
        internal string event_predicate;

        internal dm_xe_session_event(SqlDataReader dr)
        {
            event_session_address = (dr["event_session_address"] == DBNull.Value ? string.Empty : dr["event_session_address"]).ToString();
            event_name = (dr["event_name"] == DBNull.Value ? string.Empty : dr["event_name"]).ToString();
            Utilities.IsGuid((dr["event_package_guid"] == DBNull.Value ? string.Empty : dr["event_package_guid"]).ToString(), out event_package_guid);
            event_predicate = (dr["event_predicate"] == DBNull.Value ? string.Empty : dr["event_predicate"]).ToString();
        }
    }
}
